#ifndef _HTTPPARSE_
#define _HTTPPARSE_

#include<sys/types.h>
#include<sys/epoll.h>


#define MAX_READ_BUFFER 65536

#include "../tool/Logger.h"

enum Method{
    M_GET=0,
    M_POST,
    M_HEAD,
    M_PUT,
    M_DELETE,
    M_CONNECT,
    M_OPTIONS,
    M_TRACE,
    M_PATCH
};

enum Version{
    HTTP1_0 =0,
    HTTP1_1
};

struct Headers{
    
};

class Httpparse{
public:
    int fd;
    int method;
    int version;
    int status;

    char *url;
    
    int header_num;
    char **header_buffer;
    char *body_buffer;

    Httpparse(int epfd,struct epoll_event ev);
    ~Httpparse();
};

#endif